load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "config",
    srcs = ["config.go"],
    importpath = "go.f110.dev/heimdallr/pkg/config",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/k8s",
        "//pkg/rpc",
        "//vendor/github.com/go-sql-driver/mysql",
        "//vendor/github.com/gorilla/mux",
        "//vendor/go.etcd.io/etcd/client/v3:client",
        "//vendor/go.etcd.io/etcd/client/v3/namespace",
        "//vendor/go.uber.org/zap",
        "//vendor/go.uber.org/zap/zapcore",
        "//vendor/golang.org/x/xerrors",
        "//vendor/sigs.k8s.io/yaml",
    ],
)

go_test(
    name = "config_test",
    srcs = ["config_test.go"],
    embed = [":config"],
    deps = [
        "//pkg/netutil",
        "//vendor/github.com/stretchr/testify/assert",
        "//vendor/github.com/stretchr/testify/require",
        "//vendor/go.etcd.io/etcd/server/v3/embed",
        "//vendor/go.uber.org/zap/zapcore",
    ],
)
